Tables

1 Data Testing

1.1 Comparing player distance for misses, makes, and rebounds

Here I compare how far Dirk Nowitzki travels on misses, makes, and rebounds. Note to self that event message type is about the type of play, and event message action type is about what actually happened, consists of a ridiculous number of things that will need to be encoded, a start is recorded in Notes/Notes.txt.

[1] 491.3218
[1] 359.9229
[1] 413.5984

How should I decide which plot to do here, I think annotating substitutions on here would be great.

1.2 Comparing player distance on layups

Lets look at what players run the farthest on plays where there is a layup.

Let’s compare this to the list of players that run the farthest when a layup is made.

2 Player Velocity, Acceleration, and Jerk

How fast does the ball move on a particular play? I choose a pass that results in a steal here.

[1] "The mean velocity of the ball on this play is 872.514869706361 units/unit."

2.1 Acceleration

2.2 Jerk

How should I do substitutions?

3 Convex Hulls and Image Making

An NBA court is 94 feet by 50 feet. In the data x_loc (the x location variable) has a minimum, and maximum of (-5.22728, 98.53855), y_loc (the y location variable) is (-3.27955, 52.23675). It is safe to assume that the negative distances are just out of bounds, and mostly - presumably - the ball or inbounds passes.

3.1 Player positions

Let’s see where player’s are when the ball crosses the 28’ line (the three point line) on a given play. Here I choose Gerald Green making a 14’ pull-up jump shot.

event_id clock28 descriptionPlayHome
1 -Inf Jump Ball Whiteside vs. Pachulia: Tip to Dragic
2 694.58 MISS Deng 12’ Jump Shot
3 694.58 NA
4 684.87 NA
5 684.87 Whiteside REBOUND (Off:0 Def:1)
6 658.10 Dragic 15’ Jump Shot (2 PTS)
7 650.44 NA
8 650.44 Johnson REBOUND (Off:0 Def:1)
9 622.63 MISS Johnson 20’ Jump Shot
10 622.63 NA
11 616.33 NA
12 616.33 Johnson REBOUND (Off:0 Def:2)
13 582.08 NA
14 582.08 MISS Whiteside 4’ Jump Shot
15 582.08 NA
16 557.72 NA
17 557.72 Dragic REBOUND (Off:0 Def:1)
18 557.72 MISS Dragic 2’ Running Reverse Layup
19 557.72 Bosh REBOUND (Off:1 Def:0)
20 557.72 Bosh 1’ Tip Layup Shot (2 PTS)
21 553.50 NA
22 553.50 HEAT Rebound
23 529.42 MISS Dragic 16’ Jump Shot
24 529.42 NA
25 522.21 NA
26 -Inf MISS Dragic 2’ Reverse Layup
27 -Inf NA
28 -Inf Dragic STEAL (1 STL)
29 -Inf NA
30 -Inf NA
31 473.63 MISS Bosh 14’ Jump Shot
32 473.63 NA
33 -Inf NA
34 441.65 NA
35 441.65 MISS Whiteside 6’ Hook Shot
36 441.65 Whiteside REBOUND (Off:1 Def:1)
37 441.65 Whiteside 6’ Hook Shot (2 PTS)
38 436.26 NA
39 436.26 NA
40 436.26 NA
41 436.26 Whiteside REBOUND (Off:1 Def:2)
42 412.92 MISS Bosh 25’ 3PT Jump Shot
43 412.92 NA
44 -Inf NA
45 -Inf Whiteside REBOUND (Off:1 Def:3)
53 385.04 NA
54 385.04 NA
55 385.04 NA
56 346.30 Johnson Bad Pass Turnover (P1.T1)
57 342.11 NA
58 342.11 Whiteside REBOUND (Off:1 Def:4)
59 320.07 Deng 24’ 3PT Jump Shot (3 PTS) (Dragic 1 AST)
60 316.16 NA
61 285.37 Johnson 24’ 3PT Jump Shot (3 PTS) (Dragic 2 AST)
62 278.02 NA
63 278.02 Whiteside REBOUND (Off:1 Def:5)
64 246.84 Whiteside 15’ Jump Shot (4 PTS) (Deng 1 AST)
65 244.28 NA
66 244.28 Whiteside REBOUND (Off:1 Def:6)
72 216.98 NA
73 216.98 NA
74 216.98 NA
75 216.98 Deng REBOUND (Off:0 Def:1)
76 187.80 MISS Whiteside 4’ Hook Shot
77 187.80 NA
78 181.29 NA
79 181.29 Udrih REBOUND (Off:0 Def:1)
80 160.59 MISS Deng 26’ 3PT Jump Shot
81 160.59 NA
82 150.56 NA
83 150.56 Whiteside REBOUND (Off:1 Def:7)
84 150.56 HEAT Timeout: Regular (Full 1 Short 0)
86 150.56 NA
87 150.56 NA
88 150.56 NA
89 150.56 NA
90 150.56 SUB: Bosh FOR Deng
91 150.56 SUB: Dragic FOR Johnson
92 117.13 Dragic 17’ Jump Shot (6 PTS) (Bosh 1 AST)
93 114.89 NA
94 114.89 Whiteside REBOUND (Off:1 Def:8)
95 90.04 MISS Bosh 15’ Jump Shot
96 90.04 NA
97 83.92 NA
98 83.92 NA
99 83.92 NA
100 31.30 Green 18’ Jump Shot (2 PTS) (Bosh 2 AST)
101 30.13 Dragic STEAL (2 STL)
102 3.47 Whiteside Traveling Turnover (P1.T2)
103 2.50 NA
104 2.50 NA
105 2.50 NA
106 2.50 NA
108 714.56 NA
109 707.07 NA
110 707.07 NA
111 707.07 NA
112 707.07 Stoudemire REBOUND (Off:0 Def:1)
113 -Inf NA
114 679.60 Bosh Free Throw 1 of 2 (3 PTS)
116 679.60 MISS Bosh Free Throw 2 of 2
118 679.60 NA
119 675.34 NA
120 675.34 NA
121 675.34 NA
122 640.63 Bosh 24’ 3PT Jump Shot (6 PTS) (Dragic 4 AST)
123 632.60 NA
124 606.32 Dragic 25’ 3PT Jump Shot (9 PTS) (Udrih 1 AST)
125 598.81 NA
126 598.81 Udrih REBOUND (Off:0 Def:2)
132 576.61 NA
133 551.09 Stoudemire Traveling Turnover (P1.T3)
134 551.09 NA
135 520.03 Udrih 1’ Driving Layup (2 PTS)
136 512.51 NA
137 512.51 Bosh REBOUND (Off:1 Def:1)
138 488.85 Green 25’ 3PT Jump Shot (5 PTS) (Bosh 3 AST)
139 481.13 NA
147 450.71 MISS Udrih 19’ Jump Shot
148 450.71 NA
149 441.86 NA
150 418.40 MISS Bosh 2’ Driving Layup
151 418.40 NA
152 410.00 Deng P.FOUL (P1.T1) (S.Anderson)
153 410.00 SUB: Whiteside FOR Bosh
154 399.98 NA
155 368.24 Green 25’ 3PT Jump Shot (8 PTS) (Wade 1 AST)
156 365.48 Udrih S.FOUL (P1.T2) (S.Anderson)
157 361.01 NA
159 361.01 NA
160 345.12 MISS Green 3PT Jump Shot
161 345.12 NA
162 335.66 NA
163 -Inf NA
164 314.03 Deng Free Throw 1 of 2 (4 PTS)
167 314.03 SUB: Johnson FOR Udrih
168 314.03 Deng Free Throw 2 of 2 (5 PTS)
170 309.82 NA
171 309.82 Green REBOUND (Off:0 Def:1)
172 285.01 MISS Wade 2’ Driving Layup
173 285.01 NA
174 268.14 NA
175 268.14 Deng REBOUND (Off:0 Def:2)
176 267.13 Whiteside 8’ Hook Shot (8 PTS) (Wade 2 AST)
177 265.00 NA
178 240.41 MISS Green 25’ 3PT Jump Shot
179 240.41 NA
180 234.26 NA
181 211.28 MISS Green 7’ Hook Shot
182 211.28 Whiteside REBOUND (Off:2 Def:8)
183 211.28 Whiteside 1’ Tip Layup Shot (10 PTS)
184 206.14 NA
185 206.14 NA
186 206.14 NA
187 206.14 SUB: Bosh FOR Green
188 198.50 NA
189 198.50 Wade S.FOUL (P1.T3) (S.Anderson)
190 198.50 NA
191 198.12 NA
193 198.12 Whiteside REBOUND (Off:2 Def:9)
194 174.29 Wade 8’ Turnaround Hook Shot (2 PTS)
195 170.72 NA
196 -Inf NA
197 -Inf NA
199 -Inf NA
200 -Inf SUB: Dragic FOR Johnson
201 135.55 Whiteside 17’ Fadeaway Jumper (12 PTS) (Dragic 5 AST)
203 127.88 Deng P.FOUL (P2.T4) (S.Foster)
204 113.01 NA
205 87.69 Whiteside 1’ Alley Oop Layup (14 PTS) (Wade 3 AST)
206 80.32 NA
207 80.32 Whiteside REBOUND (Off:2 Def:10)
208 55.39 Bosh 25’ 3PT Jump Shot (9 PTS) (Wade 4 AST)
209 55.39 NA
210 26.63 MISS Dragic 18’ Jump Shot
211 26.63 Whiteside REBOUND (Off:3 Def:10)
212 26.63 Whiteside 1’ Layup (16 PTS)
213 24.65 Whiteside S.FOUL (P1.PN) (S.Foster)
214 21.12 NA
216 21.12 NA
217 21.12 NA
218 21.12 SUB: Johnson FOR Deng
219 21.12 NA
225 -Inf Whiteside Dunk (18 PTS) (Wade 5 AST)
226 1.08 Dragic Violation:Kicked Ball (S.Foster)
227 1.08 NA
228 1.08 NA
229 1.08 NA
230 1.08 NA
231 1.08 NA
232 1.08 NA
235 700.54 NA
236 700.54 Wade STEAL (1 STL)
237 700.54 Deng 1’ Cutting Layup Shot (7 PTS) (Wade 6 AST)
238 673.44 NA
239 673.44 Whiteside REBOUND (Off:3 Def:11)
240 670.65 MISS Bosh 3PT Jump Shot
241 670.65 NA
242 647.90 NA
243 647.90 Dragic REBOUND (Off:0 Def:2)
244 624.51 Dragic Bad Pass Turnover (P1.T4)
245 624.51 NA
246 624.51 NA
247 624.51 NA
248 624.51 Bosh REBOUND (Off:1 Def:2)
249 613.77 Bosh 20’ Jump Shot (11 PTS) (Dragic 6 AST)
250 -Inf NA
251 -Inf NA
255 577.76 MISS Whiteside Alley Oop Dunk
256 577.76 NA
257 559.30 NA
258 559.00 Bosh OFF.Foul (P1) (S.Foster)
259 559.00 Bosh Foul Turnover (P1.T5)
260 531.76 NA
261 531.76 NA
262 531.76 NA
263 531.76 Wade REBOUND (Off:0 Def:1)
264 525.72 MISS Deng 20’ Jump Shot
265 525.72 NA
266 502.45 NA
267 497.73 MISS Dragic 26’ 3PT Jump Shot
268 497.73 NA
269 -Inf NA
274 465.61 Whiteside 1’ Layup (20 PTS) (Wade 7 AST)
275 435.22 NA
276 432.98 Wade 19’ Jump Shot (4 PTS) (Dragic 7 AST)
277 390.30 NA
278 390.30 Wade REBOUND (Off:0 Def:2)
279 384.53 Deng 18’ Jump Shot (9 PTS)
280 349.06 NA
281 349.06 Bosh REBOUND (Off:1 Def:3)
290 304.58 NA
291 304.58 Dragic 16’ Turnaround Jump Shot (13 PTS)
292 280.06 NA
293 276.00 Whiteside OFF.Foul (P2) (S.Foster)
294 276.00 Whiteside Foul Turnover (P2.T6)
295 255.25 Whiteside P.FOUL (P3.T1) (S.Anderson)
296 255.25 NA
297 255.25 Green REBOUND (Off:0 Def:2)
298 247.03 MISS Deng 25’ 3PT Jump Shot
299 247.03 NA
300 229.08 NA
301 229.08 Whiteside REBOUND (Off:3 Def:12)
302 -Inf Wade 1’ Layup (6 PTS) (Green 1 AST)
307 210.32 NA
308 210.32 Dragic REBOUND (Off:0 Def:3)
309 201.00 Wade Bad Pass Turnover (P1.T7)
310 201.00 Dragic P.FOUL (P1.T2) (D.Jones)
311 189.97 Dragic STEAL (3 STL)
312 189.97 MISS Green 1’ Alley Oop Layup
313 189.97 NA
314 172.81 NA
315 172.81 NA
316 172.81 NA
317 172.81 Deng REBOUND (Off:0 Def:3)
318 168.15 Dragic 1’ Running Layup (15 PTS)
319 -Inf NA
320 141.57 NA
321 140.47 Wade 16’ Turnaround Jump Shot (8 PTS)
323 114.01 NA
325 114.01 SUB: Bosh FOR Whiteside
326 114.01 NA
328 114.01 Bosh REBOUND (Off:1 Def:4)
329 110.08 Wade 20’ Turnaround Fadeaway (10 PTS)
330 72.81 NA
331 72.73 Wade Bad Pass Turnover (P2.T8)
332 72.73 Dragic P.FOUL (P2.T4) (D.Jones)
333 72.73 SUB: Johnson FOR Dragic
334 72.73 SUB: Udrih FOR Wade
335 72.73 NA
336 72.73 Deng REBOUND (Off:0 Def:4)
337 36.10 MISS Bosh 11’ Jump Bank Shot
338 36.10 HEAT Rebound
339 36.10 NA
340 27.25 MISS Johnson 17’ Fadeaway Jumper
341 27.25 NA
342 -Inf NA
343 -Inf NA
344 -Inf NA
345 -Inf NA
346 -Inf NA
348 708.05 NA
349 703.03 MISS Bosh 19’ Jump Shot
350 703.03 NA
351 -Inf Green P.FOUL (P1.T1) (D.Jones)
352 -Inf SUB: Stoudemire FOR Deng
353 669.35 NA
354 669.35 Udrih REBOUND (Off:0 Def:3)
355 661.57 Bosh 25’ 3PT Jump Shot (14 PTS) (Udrih 2 AST)
356 644.90 NA
357 624.76 Udrih Out of Bounds - Bad Pass Turnover Turnover (P1.T9)
358 624.76 NA
359 619.59 MISS Green 12’ Jump Shot
360 619.59 HEAT Rebound
361 608.58 Johnson 19’ Jump Shot (5 PTS) (Green 2 AST)
362 -Inf Stoudemire P.FOUL (P1.T2) (S.Foster)
363 -Inf Stoudemire T.FOUL (P1.T2) (S.Foster)
364 -Inf NA
366 577.19 NA
367 577.19 Green REBOUND (Off:0 Def:3)
370 576.05 Green Free Throw 1 of 1 (11 PTS)
372 541.13 NA
373 541.13 NA
374 541.13 NA
375 535.78 Johnson 17’ Jump Shot (7 PTS) (Stoudemire 1 AST)
376 505.23 NA
377 505.23 NA
378 505.23 NA
385 -Inf NA
386 -Inf Stoudemire REBOUND (Off:0 Def:2)
387 465.14 NA
388 461.04 Bosh 20’ Jump Shot (16 PTS)
389 -Inf Green S.FOUL (P2.T3) (S.Anderson)
390 433.93 NA
392 433.93 NA
394 430.27 Green 14’ Pullup Jump Shot (13 PTS)
395 401.41 NA
396 401.41 Bosh REBOUND (Off:1 Def:5)
397 395.67 MISS Bosh 25’ 3PT Jump Shot
398 395.67 NA
399 395.67 Green S.FOUL (P3.T4) (S.Foster)
400 -Inf NA
402 -Inf SUB: Whiteside FOR Stoudemire
403 -Inf NA
404 -Inf NA
405 -Inf NA
406 -Inf NA
408 380.00 NA
409 380.00 NA
410 380.00 NA
411 368.07 MISS Bosh 17’ Jump Shot
412 368.07 NA
413 348.78 NA
414 348.78 Bosh REBOUND (Off:1 Def:6)
415 341.11 Green 19’ Jump Shot (15 PTS)
416 309.71 NA
417 307.16 NA
418 307.16 HEAT Timeout: Regular (Full 4 Short 1)
421 307.16 SUB: Dragic FOR Udrih
422 307.00 MISS Whiteside Free Throw 1 of 2
423 307.00 HEAT Rebound
424 307.00 Whiteside Free Throw 2 of 2 (23 PTS)
426 285.63 NA
427 285.63 Whiteside REBOUND (Off:3 Def:13)
428 281.20 MISS Bosh 6’ Running Jump Shot
429 281.20 Whiteside Poss Lost Ball Turnover (P3.T10)
430 -Inf NA
431 -Inf NA
432 -Inf Johnson S.FOUL (P1.PN) (S.Foster)
433 259.22 NA
435 259.22 NA
436 259.22 NA
438 259.22 Whiteside REBOUND (Off:4 Def:14)
439 254.30 Whiteside 3 Second Violation Turnover (P4.T11)
440 254.30 NA
441 254.30 Dragic REBOUND (Off:0 Def:4)
442 227.64 Green Driving Dunk (17 PTS)
443 199.30 Whiteside BLOCK (1 BLK)
444 199.30 NA
445 199.30 NA
446 199.30 Whiteside REBOUND (Off:4 Def:15)
447 197.36 Whiteside 12’ Fadeaway Jumper (25 PTS)
450 281.20 Whiteside REBOUND (Off:4 Def:13)
456 154.84 NA
457 154.84 Haslem 6’ Driving Hook Shot (2 PTS)
458 127.78 NA
459 127.78 Haslem REBOUND (Off:0 Def:1)
460 121.59 Green Driving Dunk (19 PTS)
461 99.62 NA
462 99.62 NA
464 80.03 MISS Andersen 25’ 3PT Jump Shot
465 80.03 Johnson REBOUND (Off:1 Def:2)
466 80.03 MISS Johnson 26’ 3PT Jump Shot
467 80.03 Andersen REBOUND (Off:1 Def:0)
468 80.03 Johnson Bad Pass Turnover (P2.T12)
469 -Inf NA
470 -Inf HEAT Rebound
471 43.40 NA
472 43.40 Johnson Free Throw 1 of 2 (8 PTS)
474 43.40 MISS Johnson Free Throw 2 of 2
476 43.40 NA
477 23.47 NA
478 22.06 NA
479 14.39 MISS Andersen 6’ Jump Shot
480 14.39 Haslem REBOUND (Off:1 Def:1)
481 14.39 HEAT Turnover: Shot Clock (T#13)
482 14.39 NA

3.2 Calculating the “Convex Hull”

We have to do this separately, for the defensive and offensive teams, although there could be interesting results for convex hulls by types of players.

3.3 Plotting on a Court

It looks like this play starts on an inbound.

3.4 Quick Interlude of Team Color Data

3.5 Animating Play 394

3.6 FOR TESTING

4 Testing Out Functions

event_id
1 149
5226 180
9626 225
11573 255
16864 275
23739 442
28139 460
 

A work by Duncan Gates

gatesdu@oregonstate.edu